const electronPackager = require('electron-packager');
const setLanguages = require('electron-packager-languages');
const packageJson = require('./package.json');

electronPackager({
    dir: ".",
    name: packageJson.packagerName,
    platform: 'win32',
    arch: "x64",
    icon: "./electron/favicon.ico",
    out: "./out",
    asar: true,
    overwrite: true,
    ignore: [
        ".git",
        "node_modules",
        "dev",
        "src",
        "public",
        "out"
    ],
    appVersion: packageJson.version,
    electronVersion: packageJson.devDependencies.electron.substring(1),
    afterCopy: [setLanguages(['zh-CN'])]
});